﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CarInsure_s.aspx.cs" Inherits="Webcar.Car.CarInsure_s" %>

<%@ Register Assembly="WebPager" Namespace="DevCenterNew" TagPrefix="cc1" %>

<%@ Register Src="../SearchPanel.ascx" TagName="SearchPanel" TagPrefix="uc2" %>

<%@ Register Src="../Controls/NaviBar.ascx" TagName="NaviBar" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body style="margin:0px 0px 0px 0px; padding:0px 1px 0px 1px; overflow-y:hidden">
    <form id="form1" runat="server">
        <div>
            <uc1:NaviBar ID="NaviBar1" runat="server" />
            <uc2:SearchPanel ID="SearchPanel1" runat="server"  OnSearchClick = "Seach_Click"/>
        </div>
        <div class="div_blue">
        <table><tr><td>&nbsp;查询保单(月份格式如2011-09)：
        </td><td ><asp:TextBox ID="txtMonths" runat="server" >
        </asp:TextBox></td>
        <td>
        <asp:RadioButtonList runat="server" ID="radio1" RepeatColumns="2">
        <asp:ListItem Selected=True Text="选定月份到期的保单" Value="1">
        
        </asp:ListItem>
        <asp:ListItem Selected=False Text="选定月份开始的保单" Value="2">
        
        </asp:ListItem>
        
        </asp:RadioButtonList>
        </td>
        <td >
        <asp:Button ID="btnQuery" runat="server" SkinID="default_button" Text="查询" OnClick="btnQuery_Click"/>
        </td>
        </tr></table>
        </div>
        <asp:GridView ID="GridView1"  DataKeyNames="insure_no" SkinID="gridviewSkin" AutoGenerateColumns="False" runat="server" Width="100%" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting" ShowFooter="True">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" />
                        <asp:Image ID="Image2" runat="server" ImageUrl="~/App_Themes/Default/image2/newpost2.gif" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="所属单位">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlDeptName" runat="server" NavigateUrl="" Text='<%# Eval("dept_name") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="牌照号">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlRecordNo" runat="server" NavigateUrl="" Text='<%# Eval("record_no") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="保险单号">
                    <ItemTemplate>
                        <asp:HyperLink ID="linkEdit" runat="server"
                            Text='<%# Eval("insure_no2") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="start_date" HeaderText="保险开始时间" />
                <asp:BoundField DataField="insure_money" HeaderText="保险金额" DataFormatString="{0:F1}" />
                
                <asp:BoundField DataField="end_date" HeaderText="保险结束时间" />
                <asp:BoundField DataField="zt" HeaderText="保险单状态" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="DeleteBtn" runat="server" Text = "删除" CommandName = "Delete"
                         CommandArgument='<%#Bind("Insure_no")%>'></asp:LinkButton>
                         <%--<a href="javascript:alert('此功能已屏蔽，要续保请录入新保单。')">续保</a>--%>
                         <asp:HyperLink ID="linkContinue" runat="server"
                            Text='续保' Visible ="true"></asp:HyperLink>
                            
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <div class="pager">
            <div style="text-align:left;float:left;padding-top:1px">
                [<asp:LinkButton ID="linkPrint" runat="server" Text="查看打印页" OnClick="linkPrint_Click"></asp:LinkButton>]
                <asp:HyperLink ID="HyperLink2" NavigateUrl="" runat="server">增加车辆保险</asp:HyperLink>
                &nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="cbNew" runat="server" Text="未查看保险"/>
            </div>
            <div class="p">
                <cc1:WebPager Width="400px" ID="WebPager1" runat="server" DisplayText="<span style='color: black'>第{0}页&nbsp共{1}页&nbsp总计{2}条&nbsp每页{3}条</span>" OnPageIndexChanged="WebPager1_PageIndexChanged"  />
            </div>
        </div>
        
    </form>
</body>
</html>
